#!/usr/bin/ruby -w

require 'downloader'
require 'analyzer'

###### input data #######

# see all free action games
link = 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewRoom?fcId=374573913&genreIdString=7001&mediaTypeString=Mobile+Software+Applications'

begin
    puts 'script started'
    
    #TODO Mkuz::Downloader.new("./data00").run(link, 'All Free Action Games')
    Mkuz::Analyzer.new('data00/All Free Action Games_2011-11-13.csv').run
    
    puts 'script finished successfully'
#TODO rescue
#    puts $!
#    retry
end